package com.bawei.home.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import com.bawei.home.entity.SimpleTypeEntity

class ViewPageAdapter(private val fragments: MutableList<Fragment>, fm: FragmentManager, behavior:Int, private val tabs: MutableList<SimpleTypeEntity>): FragmentStatePagerAdapter(fm, behavior){
    override fun getCount(): Int = fragments.size

    override fun getItem(position: Int): Fragment = fragments[position]

    override fun getPageTitle(position: Int): CharSequence? = tabs[position].typename


}